<%@ page contentType="text/html;charset=UTF-8" %>
<style type="text/css">
    #partner_login_btn a {
        color: #e8473f;
        background: #fff;
        border: 1px solid #e8473f;
    }
    .nav-tabs #partner_login_btn:hover a{
        color: #e8473f!important;
        background: #fff;
    }
</style>

<%--<!--固定-->--%>
<%--<div class="fix-r" id="fix_r">--%>
    <%--<a class="iconfont icon-close" href="javascript:hideFix()"></a>--%>
    <%--<img class="service-icon" src="${ctx}/image/index/kefu.png" alt="">--%>
    <%--<p class="f14"><i class="iconfont icon-dianhua"></i>全国免费电话</p>--%>
    <%--<p class="b">4008-771-663</p>--%>
    <%--&lt;%&ndash;<a class="c-btn mt10" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=640288741&site=qq&menu=yes">在线QQ咨询</a>&ndash;%&gt;--%>
    <%--<a class="c-btn mt10 zxzx" target="_blank" href="javascript:void(0)">在线咨询</a>--%>
    <%--<a class="c-btn" href="javascript:void(0)" id="msg_btn">留言联系</a>--%>
    <%--<div class="to-top" id="top_back">--%>
        <%--<i class="iconfont icon-fold"></i>--%>
    <%--</div>--%>
    <%--<div class="lx-kf-wechat">--%>
        <%--<p>客服微信</p>--%>
        <%--<img src="${ctx}/image/k-qrcode.png" alt="客服微信"/>--%>
    <%--</div>--%>
<%--</div>--%>

<!--头部-->
<nav>
    <div class="m-head">
        <div class="g-box head-inner clearfix">
            <a class="m-logo" href="${ctx}"> <img title="同行者" alt="同行者" src="${ctx}/image/index/logo.png"/>
            </a>
            <ul class="nav-tabs">
                <li data-idx="0"><a href="${ctx}">首页</a></li>
                <li data-idx="1"><a href="${ctx}/about.do">我是同行者</a></li>
                <%--<li data-idx="2" class="product"><a href="javascript:void(0)" rel="产品方案"><span id="prod-info">产品方案</span> <i class="iconfont icon-unfold"></i></a>--%>
                    <%--<div class="p-plan">--%>
                        <%--<div><a href="${ctx}/about/community.do">社群系统</a></div>--%>
                        <%--<div><a href="${ctx}/about/match.do">众筹系统</a></div>--%>
                        <%--<div><a href="${ctx}/about/outing.do">高端户外</a></div>--%>
                    <%--</div>--%>
                <%--</li>--%>
                <%--<li data-idx="3"><a href="${ctx}/about/ole.do">同行学院</a></li>--%>
                <li class="download-app"><a href="javascript:void(0)" rel="下载App">下载App</a>
                    <div class="qr-code">
                        <div class="qr-item">
                            <img src="${ctx}/image/mgr_app_qrcode.png" alt=""/>
                            <p>机构版APP</p>
                        </div>
                        <div class="qr-item">
                            <img src="${ctx}/image/partner_app_qrcode.png" alt=""/>
                            <p>CEO社群联盟</p>
                        </div>
                    </div>
                </li>
                <c:if test="${empty sessionScope.newCurrentUser}">
                    <li class="login-btn" id="partner_login_btn"><a href="javascript:void(0)">登录</a></li>
                    <%--<li class="login-btn"><a id="partner_register_btn" href="javascript:void(0)">注册</a></li>--%>
                </c:if>
                <c:if test="${not empty sessionScope.newCurrentUser}">
                    <li class="hd-u">
                        <div class="hd-u-info">
                            <div class="u-logo common-img" >
                                <c:if test="${sessionScope.newCurrentUser.isPartner == 1  }">
                                    <a href="${ctx}/member/membermgmt/list.do">
                                        <img src="${sessionScope.newCurrentUser.logo}"  onerror="txz.errImg(this)" onload="txz.imgLoad(this)" >
                                    </a>
                                </c:if>
                                <c:if test="${sessionScope.newCurrentUser.type == 4}">
                                    <a href="${ctx}/member/membermgmt/list.do">
                                        <img src="${sessionScope.newCurrentUser.logo}"  onerror="txz.errImg(this)" onload="txz.imgLoad(this)" >
                                    </a>
                                </c:if>
                                <%--<c:if test="${sessionScope.newCurrentUser.isCopartner == 1 && (sessionScope.newCurrentUser.isPartner == 0 || empty sessionScope.newCurrentUser.isPartner)}">
                                    <a href="${ctx}/activity/zcActivity/zcActivityCopartnerList.do">
                                        <img src="${sessionScope.newCurrentUser.logo}"  onerror="txz.errImg(this)" onload="txz.imgLoad(this)" >
                                    </a>
                                </c:if>--%>
                            </div>
                            <span class="u-name">${sessionScope.newCurrentUser.realname}</span>
                            <i class="iconfont icon-unfold"></i>
                        </div>
                        <div class="u-navs">
                            <%--<shiro:hasRole name="partner">--%>
                                <%--<a class="f16" id="home_page">账户中心</a>--%>
                                <%--<a class="f16" href="${ctx}/system/member/fundMana.do">资金管理</a>--%>
                                <%--<c:if test="${!sessionScope.newCurrentUser.child || sessionScope.newCurrentUser.oneLevelChildren}">--%>
                                    <%--<a class="f16" href="${ctx}/member/group/childList.do">子账号管理</a>--%>
                                <%--</c:if>--%>
                            <%--</shiro:hasRole>--%>
                            <a class="f16" id="logout">退出</a>
                        </div>

                    </li>
                </c:if>
            </ul>
        </div>
    </div>
    <div id="shade" class="m-header-shade"></div>
</nav>
<script>
    $(function () {
        var storage = localStorage;

        txz.addToTopScroll();
        $('#logout').on('click', function () {
            $.post('${ctx}/user/login/logout.do', function (res) {
                if (res.success) {
                    location.reload()
                } else {
                    util.layerAlertError(res.description)
                }
            });
        });
        if (headNavIdx == 2) {
            if (window.location.href.indexOf('community') != -1 || window.location.href.indexOf('buyService.do?type=1') != -1) {
                $('#prod-info').html('社群系统')
                $('.product span, .product i').css('color', '#e8473f')
                $('.p-plan div:nth-child(1) a').css('color', '#e8473f')
            } else if (window.location.href.indexOf('match') != -1 || window.location.href.indexOf('buyService.do?type=2') != -1) {
                $('#prod-info').html('众筹系统')
                $('.product span, .product i').css('color', '#e8473f')
                $('.p-plan div:nth-child(2) a').css('color', '#e8473f')
            } else  if (window.location.href.indexOf('outing') != -1){
                $('#prod-info').html('高端户外')
                $('.product span, .product i').css('color', '#e8473f')
                $('.p-plan div:nth-child(3) a').css('color', '#e8473f')
            }

        } else {
            $('.nav-tabs li[data-idx='+headNavIdx+']').addClass('active')
        }
        $(".zxzx").hover(function () {
            $(".lx-kf-wechat").show();
        }, function () {
            $(".lx-kf-wechat").hide();
        });

        $("#partner_login_btn").click(function () {
            storage.setItem('clickType', 'login_btn');
            location.href = '${ctx}/pLogin.do';
        });
        $("#partner_register_btn").click(function () {
            storage.setItem('clickType', 'register_btn');
            location.href = '${ctx}/pLogin.do';
        });

        $('#home_page').on('click', function () {
            var isTwo = '${sessionScope.newCurrentUser.twoLevelChildren}';
            if (isTwo == 'true') {
                location.href = '${ctx}/member/group/childForm.do';
            } else {
                location.href = '${ctx}/system/member/memberIndex.do';
            }
        });
    })
    function hideFix() {
        $('#fix_r').fadeOut()
    }
</script>